import Vue from 'vue';
import Vuex from 'vuex';
Vue.use(Vuex);
const store = new Vuex.Store(
  {
    state:{
      loadingBarActive:false,
      loadingBarHidden:false,
    },
    getters:{
      _loadingBarActive(state){
        return state.loadingBarActive
      },
      _loadingBarHidden(state){
        return state.loadingBarHidden
      }
    },
    mutations:{
      changeLoadingBarActive(state,bool){
        alert()
        state.loadingBarActive = bool
      },
      changeLoadingBarHidden(state,bool){
        alert()
        state.loadingBarHidden = bool
      }
    },
    actions:{
      _changeLoadingBarActive(context,bool){
        context.commit('changeLoadingBarActive',bool)
      },
      _changeLoadingBarHidden(context,bool){
        context.commit('changeLoadingBarHidden',bool)
      }
    }
  }
);
export default store;
